Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support notary and w/o notary work flows in contracts #74

Merged
merged 19 commits into from
May 5, 2021
Merged

Support notary and w/o notary work flows in contracts #74

merged 19 commits into from
May 5, 2021

Conversation

alexvanin
Copy link
Contributor

@alexvanin alexvanin commented Apr 20, 2021

In this pull request:

  • contracts supported enabled and disabled notary work flows: if notary enabled at init stage, then contracts use multi signature checks, otherwise contracts collect ballots,
  • added processing contract that processes multi signature checks in main chain and pays for them when notary enabled,
  • added withdraw fee, that transferred to processing contract or alphabet nodes to pay for neofs.Cheque invocation,
  • all default global configuration records are gone, they should be specified by initialization scripts external to contracts.

Using multi signature checks allows to decrease withdraw fee. With ballot collection it required from 0.4*7=2.8 up to 7.0 GAS per withdraw. With multi signature checks it is about 0.2 GAS per withdraw.

Closes #70

This method returns multi signature address of alphabet
nodes in NeoFS contract.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Ballots are inefficient to collect invocations of contract methods.
Instead contract can check multi signature collected outside of the
contract, e.g. with notary service.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
All ballots and voting methods are gone. Multi signature
checks are used in all contracts.

Default global config values are also removed. Configuration
must be provided by initialization script.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Processing contract deployed in main chain and processes
multi signature invocations of NeoFS contract by
verifying multi signature and paying for it.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Processing contracts pays for cheque that transfer
assets back to the user, so user should transfer
some fee to this contract.

Withdraw fee defined in NeoFS global configuration.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
@alexvanin
Copy link
Contributor Author

Workflow with notary before:
image

Workflow with optional notary after:
image

@alexvanin alexvanin merged commit e4ba936 into nspcc-dev:master May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transfer assets to alphabet nodes at neofs.Withdraw
1 participant